import request from '@/axios'
import type {UserType} from './types'

interface IResponse<T = any> {
  code: number
  data: T extends any ? T : T & any
}

export const loginApi = (data: UserType): Promise<IResponse<UserType>> => {
  return request.post({url: '/mock/user/login', data})
}
